package org.chen.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@TableName("fy_daily_stats")
@Schema(name = "DailyStats对象", description="每日统计表")
public class DailyStats extends Model<DailyStats> {

    @Schema(description = "每日统计ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date statDate;

    @Schema(description = "订单数量")
    private Integer orderCount = 0;

    @Schema(description = "交易金额")
    private BigDecimal totalAmount = BigDecimal.ZERO;

    @Schema(description = "退款金额")
    private BigDecimal refundAmount = BigDecimal.ZERO;

    @Schema(description = "创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    @Schema(description = "修改日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    @Schema(description = "版本")
    private Integer version;
}
